<template>
  <div class="app-container">
    <eHeader :param-bean="paramBean" :sup_this="sup_this" />
    <eForm ref="form" :sup_this="sup_this" />
    <!--表格渲染-->
    <DataGridTable
      ref="mainTable"
      :sup_this="sup_this"
      :data="data.rtnList"
      :total="total"
      grid-id="ftpConfigMngProcessGridId"
      @selection-change="handleGridSelectionChange">
      <DataGridColumnSlot prop="name" label="名称" width="200px">
        <template slot-scope="scope">
          <edit :data="scope.row" :sup_this="sup_this" />
        </template>
      </DataGridColumnSlot>
      <DataGridColumn prop="ip" label="IP" />
      <DataGridColumn prop="port" label="端口号" />
      <DataGridColumn prop="user" label="用户名" />
      <DataGridColumn prop="defaultFlag" label="默认标识" />
      <DataGridColumn prop="attribute1" label="内部访问地址" />
      <DataGridColumnSlot prop="lastUpdateDate" label="更新日期">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.lastUpdateDate) }}</span>
        </template>
      </DataGridColumnSlot>
    </DataGridTable>
  </div>
</template>

<script>
import checkPermission from '@/utils/permission'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
import edit from './module/edit'
import eForm from './module/form'
import initData from '@/mixins/initData'
import { loadDataUrl } from '@/api/system/ftpConfig'

export default {
  components: { eHeader, eForm, edit },
  mixins: [initData],
  props: {
  },
  data() {
    return {
      delLoading: false,
      sup_this: this
    }
  },
  created() {
    this.url = loadDataUrl()
  },
  mounted() {
    this.init()
  },
  methods: {
    parseTime,
    checkPermission,
    async beforeInit() {
      return true
    }
  }
}
</script>
